package com.sugar.follow.up.module.business.dal.mysql.patientqlxcajgjzxrslds;

import com.sugar.follow.up.framework.common.pojo.PageResult;
import com.sugar.follow.up.framework.mybatis.core.query.LambdaQueryWrapperX;
import com.sugar.follow.up.framework.mybatis.core.mapper.BaseMapperX;
import com.sugar.follow.up.module.business.dal.dataobject.patientqlxcajgjzxrslds.PatientQlxcajgjzxrsldsDO;
import org.apache.ibatis.annotations.Mapper;
import com.sugar.follow.up.module.business.controller.admin.patient.qlxcajgjzxrslds.vo.*;

/**
 * 前列腺Ca激光局灶消融术/冷冻术 Mapper
 *
 * @author Ysguar
 */
@Mapper
public interface PatientQlxcajgjzxrsldsMapper extends BaseMapperX<PatientQlxcajgjzxrsldsDO> {

    default PageResult<PatientQlxcajgjzxrsldsDO> selectPage(PatientQlxcajgjzxrsldsPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<PatientQlxcajgjzxrsldsDO>()
                .eqIfPresent(PatientQlxcajgjzxrsldsDO::getPatientId, reqVO.getPatientId())
                .likeIfPresent(PatientQlxcajgjzxrsldsDO::getPatientName, reqVO.getPatientName())
                .eqIfPresent(PatientQlxcajgjzxrsldsDO::getDoctorId, reqVO.getDoctorId())
                .likeIfPresent(PatientQlxcajgjzxrsldsDO::getDoctorName, reqVO.getDoctorName())
                .betweenIfPresent(PatientQlxcajgjzxrsldsDO::getCreateTime, reqVO.getCreateTime())
                .orderByDesc(PatientQlxcajgjzxrsldsDO::getId));
    }

}